<script>
    // 三、使用Set数据结构对以下对象数组去重
    let user = [
        { id: 1, name: "李四", age: 20 },
        { id: 2, name: "张三", age: 30 },
        { id: 1, name: "李四", age: 20 }
    ]
    let newArr = [...new Set(user.map(v => JSON.stringify(v)))].map(s => JSON.parse(s))
    console.log(newArr);
</script>